﻿using System;
using System.Collections.Generic;
using MSAcademic.v2.Infrastructure.Gallery;

namespace MSAcademic.v2.Web.Areas.Admin.Models.Gallery
{
    public partial class ListIndependantGalleries
    {
        public int ArticleId { get; set; }

    }
    public partial class ListIndependantGalleries
    {
        public List<IGallery> Galleries
        {
            get
            {
                if (_galleries == null)
                {
                    _galleries = new Lazy<List<IGallery>>(() => _galleryQueries.GetArticleIndependantGalleries());
                }
                return _galleries.Value;
            }
        }
        public IGallery CurrentGallery
        {
            get
            {
                if (_currentGallery == null)
                {
                    _currentGallery = new Lazy<IGallery>(() => _galleryQueries.GetGalleryForArticle(this.ArticleId));
                }
                return _currentGallery.Value;
            }
        }
        private Lazy<IGallery> _currentGallery;
        private Lazy<List<IGallery>> _galleries;
    }
    public partial class ListIndependantGalleries
    {
        private readonly IGalleryQueries _galleryQueries;
        public ListIndependantGalleries(IGalleryQueries galleryQueries)
        {
            _galleryQueries = galleryQueries;
        }

    }
}